import {ColumnTypeEnum, FixedEnum, AlignEnum} from "../enums/base-table.enum";
import OptionModel from "@/common/model/option.model";

/*列配置模型*/
export default class ColumnModel {
    /*列名称*/
    public label: string;

    /*字段名*/
    public prop: string;

    /*是否开启排序*/
    public sortable?: boolean;

    /*列宽度*/
    public width?: number;

    /*是否显示tips*/
    public showTip?: boolean;

    /*固定列滚动*/
    public fixed?: FixedEnum;

    /*列对其方式*/
    public align?: AlignEnum;

    /*列类型，普通文本、序号、图片、操作列*/
    public type?: ColumnTypeEnum = ColumnTypeEnum.text;

    /*是否开启过滤*/
    filterEnable?: boolean = true;
    /*过滤类型 下拉，时间等等*/
    filterType?: string;
    /*过滤选项*/
    filterOptions?: OptionModel[];
}
